package cn.tedu.elasticsearch.demo.repository;

import cn.tedu.elasticsearch.demo.po.StudentESPO;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.Date;
import java.util.List;

/**
 * mapper接口继承baseMapper<PO>
 * XXRepository 接口继承ElasticsearchRepository<E,T>
 * E泛型表示持久化PO
 * T文档对象id类型
 */
public interface StudentESRepository extends ElasticsearchRepository<StudentESPO,String> {
    // 自定义抽象方法
    List<StudentESPO> findByProfile(String profile);
    List<StudentESPO> findByBirthdayBetween(Date start, Date end);
}
